# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test05
# Description:  分片
# Author:       ASUS
# Date:         2019/1/18
#-------------------------------------------------------------------------------


numbers=[1,2,3,4,5,6,7,8]
print(numbers[5:8])              #运行结果：[6,7,8]
print(numbers[-3:-1])            #运行结果：[6,7]


print(numbers[-3:0])             # 结束索引比开始索引出现的晚，返回空序列,运行结果:[]
print(numbers[-3:8])             #运行结果：[6,7,8]
print(numbers[-3:])              #省略结束索引,运行结果：[6,7,8]
print(numbers[:3])               #省略开始索引，运行结果：[1,2,3]
print(numbers[:])                #省略开始索引和结束索引，复制整个序列




